﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DBComparer
{
    public partial class AuthenticationTypeSelect : UserControl
    {
        Type _type = Type.Windows;

        public Type AuthenticationType
        {
            get { return _type; }
            set { _type = value; }
        }


        public enum Type {
            Windows,
            SQL
        }

        public event EventHandler onTypeChange;

        public AuthenticationTypeSelect()
        {
            InitializeComponent();
        }

        private void AuthenticationTypeSelect_Load(object sender, EventArgs e)
        {
            cboAuthentication.SelectedIndex = 0;
        }

        private void cboAuthentication_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cboAuthentication.SelectedIndex == 0)
                AuthenticationType = Type.Windows;
            else
                AuthenticationType = Type.SQL;

            if (onTypeChange != null)
                onTypeChange(sender, e);
        }
    }
}
